//
//  HomeAnotherTableViewCell.m
//  news
//
//  Created by imacbookair on 16/3/10.
//  Copyright © 2016年 imacbookair. All rights reserved.
//

#import "HomeAnotherTableViewCell.h"

@implementation HomeAnotherTableViewCell

#pragma mark - 初始化

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // title
        self.title = [[UILabel alloc]init];
        
        // 左图
        self.zuo = [[UIImageView alloc]init];
        
        // 中图
        self.zhong = [[UIImageView alloc]init];
        
        // 右图
        self.you = [[UIImageView alloc]init];
        
        // 时间
        self.time = [[UILabel alloc]init];
        _time.font = [UIFont systemFontOfSize:12];
        
        
        // 评论
        self.pinlun = [[UIImageView alloc]init];
        _pinlun.image = [UIImage imageNamed:@"pinlun"];
        
        // 评论Label
        self.pin = [[UILabel alloc]init];
        _pin.font = [ UIFont systemFontOfSize:12];
        _pin.textAlignment = NSTextAlignmentRight;
        
        [self.contentView addSubview:_title];
        [self.contentView addSubview:_zuo];
        [self.contentView addSubview:_zhong];
        [self.contentView addSubview:_you];
        [self.contentView addSubview:_time];
        [self.contentView addSubview:_pinlun];
        [self.contentView addSubview:_pin];
        
        [_title NightWithType:UIViewColorTypeNormal];
        [_zuo NightWithType:UIViewColorTypeNormal];
        [_zhong NightWithType:UIViewColorTypeNormal];
        [_you NightWithType:UIViewColorTypeNormal];
        [_time NightWithType:UIViewColorTypeNormal];
        [_pinlun NightWithType:UIViewColorTypeNormal];
        [_pin NightWithType:UIViewColorTypeNormal];
        
        
    }
    return self;
}

#pragma mark - 布局
- (void)layoutSubviews
{
    [super layoutSubviews];
    _title.frame = CGRectMake(20 * KWITH, 8 * KHIGHT, 105 * KWITH, 80 * KHIGHT);
    _zuo.frame = CGRectMake(20 * KWITH, 40 * KHIGHT, 105 * KWITH, 80 * KHIGHT);
    _zhong.frame = CGRectMake(135 * KWITH, 40 * KHIGHT, 105 * KWITH, 80 * KHIGHT);
    _you.frame = CGRectMake(250 * KWITH, 40 * KHIGHT, 105 * KWITH, 80 * KHIGHT);
    _time.frame = CGRectMake(20 * KWITH, 123 * KHIGHT, 150 * KWITH, 20 * KHIGHT);
    _pinlun.frame = CGRectMake(332 * KWITH, 126 * KHIGHT, 15 * KWITH, 15 * KHIGHT);
    _pin.frame = CGRectMake(280 * KWITH, 123 * KHIGHT, 50 * KWITH, 20 * KHIGHT);
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
